Optimal. Leaf size=84 \[ \frac {a (c+d x)^2}{2 d}-\frac {b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac {i b (c+d x)^2}{2 d}+\frac {i b d \text {Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {3722, 3719, 2190, 2279, 2391} \[ \frac {a (c+d x)^2}{2 d}-\frac {b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac {i b (c+d x)^2}{2 d}+\frac {i b d \text {Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3719
Rule 3722
Rubi steps
\begin {align*} \int (c+d x) (a+b \tan (e+f x)) \, dx &=\int (a (c+d x)+b (c+d x) \tan (e+f x)) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+b \int (c+d x) \tan (e+f x) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+\frac {i b (c+d x)^2}{2 d}-(2 i b) \int \frac {e^{2 i (e+f x)} (c+d x)}{1+e^{2 i (e+f x)}} \, dx\\ &=\frac {a (c+d x)^2}{2 d}+\frac {i b (c+d x)^2}{2 d}-\frac {b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac {(b d) \int \log \left (1+e^{2 i (e+f x)}\right ) \, dx}{f}\\ &=\frac {a (c+d x)^2}{2 d}+\frac {i b (c+d x)^2}{2 d}-\frac {b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}-\frac {(i b d) \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{2 f^2}\\ &=\frac {a (c+d x)^2}{2 d}+\frac {i b (c+d x)^2}{2 d}-\frac {b (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac {i b d \text {Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 87, normalized size = 1.04 \[ a c x+\frac {1}{2} a d x^2-\frac {b c \log (\cos (e+f x))}{f}+\frac {i b d \text {Li}_2\left (-e^{2 i (e+f x)}\right )}{2 f^2}-\frac {b d x \log \left (1+e^{2 i (e+f x)}\right )}{f}+\frac {1}{2} i b d x^2 \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.55, size = 160, normalized size = 1.90 \[ \frac {2 \, a d f^{2} x^{2} + 4 \, a c f^{2} x - i \, b d {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (f x + e\right ) - 1\right )}}{\tan \left (f x + e\right )^{2} + 1} + 1\right ) + i \, b d {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (f x + e\right ) - 1\right )}}{\tan \left (f x + e\right )^{2} + 1} + 1\right ) - 2 \, {\left (b d f x + b c f\right )} \log \left (-\frac {2 \, {\left (i \, \tan \left (f x + e\right ) - 1\right )}}{\tan \left (f x + e\right )^{2} + 1}\right ) - 2 \, {\left (b d f x + b c f\right )} \log \left (-\frac {2 \, {\left (-i \, \tan \left (f x + e\right ) - 1\right )}}{\tan \left (f x + e\right )^{2} + 1}\right )}{4 \, f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} {\left (b \tan \left (f x + e\right ) + a\right )}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.39, size = 143, normalized size = 1.70 \[ \frac {i b d \,x^{2}}{2}-i b c x +\frac {a d \,x^{2}}{2}+c a x -\frac {b c \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f}+\frac {2 b c \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}+\frac {2 i b d e x}{f}+\frac {i b d \,e^{2}}{f^{2}}-\frac {b d \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) x}{f}+\frac {i b d \polylog \left (2, -{\mathrm e}^{2 i \left (f x +e \right )}\right )}{2 f^{2}}-\frac {2 b d e \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.75, size = 130, normalized size = 1.55 \[ \frac {{\left (a + i \, b\right )} d f^{2} x^{2} + 2 \, {\left (a + i \, b\right )} c f^{2} x + i \, b d {\rm Li}_2\left (-e^{\left (2 i \, f x + 2 i \, e\right )}\right ) - {\left (2 i \, b d f x + 2 i \, b c f\right )} \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right ) + 1\right ) - {\left (b d f x + b c f\right )} \log \left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} + 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )}{2 \, f^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.22, size = 161, normalized size = 1.92 \[ \frac {a\,x\,\left (2\,c+d\,x\right )}{2}-\frac {b\,d\,\left (\pi \,\ln \left (\cos \left (f\,x\right )\right )-\pi \,\ln \left ({\mathrm {e}}^{f\,x\,2{}\mathrm {i}}+1\right )+\mathrm {polylog}\left (2,-{\mathrm {e}}^{-e\,2{}\mathrm {i}}\,{\mathrm {e}}^{-f\,x\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}-\pi \,\ln \left ({\mathrm {e}}^{-e\,2{}\mathrm {i}}\,{\mathrm {e}}^{-f\,x\,2{}\mathrm {i}}+1\right )+2\,e\,\ln \left ({\mathrm {e}}^{-e\,2{}\mathrm {i}}\,{\mathrm {e}}^{-f\,x\,2{}\mathrm {i}}+1\right )-\ln \left (\cos \left (e+f\,x\right )\right )\,\left (2\,e-\pi \right )+f^2\,x^2\,1{}\mathrm {i}+2\,f\,x\,\ln \left ({\mathrm {e}}^{-e\,2{}\mathrm {i}}\,{\mathrm {e}}^{-f\,x\,2{}\mathrm {i}}+1\right )+e\,f\,x\,2{}\mathrm {i}\right )}{2\,f^2}+\frac {b\,c\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (e + f x \right )}\right ) \left (c + d x\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________